package com.yulongtian.Java_basic;

import java.util.Random;
import java.util.Scanner;

/**
 * @author yulongTian
 * @create 2024-05-18 15:34
 */
public class ScannerDemo {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        System.out.print("请输入一个整数:");
        int i = in.nextInt();
        System.out.println("您输入了:" + i);
        in.close();

        Random random = new Random();
        int i1 = random.nextInt();
        System.out.println("随机生成了一个整数:" + i1);
    }

}
